<extend name="Public/publicHTML" />

<block name="content">
<link rel="stylesheet" href="__COMMON__/bootstrap/css/bootstrap.min.css" />
<link rel="stylesheet"
	href="__COMMON__/bootstrap/css/font-awesome.min.css" />
<div class="wrapper">
	<section class="content ">
		<!-- Main content -->
		<div class="container-fluid">
			<div class="pull-right">
				<a href="javascript:history.go(-1)" data-toggle="tooltip" title=""
					class="btn btn-default" data-original-title="返回"><i
					class="fa fa-reply"></i></a>
			</div>
			<div class="panel panel-default">
				<div class="panel-heading">
					<h3 class="panel-title">
						<i class="fa fa-list"></i>退换货或者退款
					</h3>
				</div>
				<div class="panel-body ">
					<!--表单数据-->
					<form method="post" id="return_form">
						<!--通用信息-->
						<div class="tab-content col-md-10">
							<div class="tab-pane active" id="tab_tongyong">
								<table class="table table-bordered">
									<tbody>
										<tr>
											<td class="col-sm-2">订单编号：</td>
											<td class="col-sm-8"><a
												href="{:U('orderDetail',array($org::$orderId_d =>$data[$org::$orderId_d]))}">{$data[$order::$orderSn_id_d]}</a>
											</td>
										</tr>
										<tr>
											<td>用户：</td>
											<td>{$data[$user::$userName_d]}</td>
										</tr>
										<tr>
											<td>申请日期：</td>
											<td>{$data[$org::$createTime_d]|date="Y-m-d H:i",###}</td>
										</tr>
										<tr>
											<td>商品名称：</td>
											<td><a
												href="{:U('Home/Goods/goodsInfo',array('id'=>$return_goods[goods_id]))}"
												target="_blank">{$data[$goods::$title_d]}</a></td>
										</tr>
										<if condition="$status == 9">
											<tr>
												<td>退款状态：</td>
												<td>退款成功【退货】请处理后续操作</td>
											</tr>
										</if>
										<tr>
											<td>退换货：</td>
											<td>
												<div class="form-group col-xs-3"> <!-- name="type" -->
													<select class="form-control" disabled="disabled">
														<foreach name="refund" key='key' item='value'>
															<option  value="{$key}"<if
																	condition="$data[$org::$type_d] eq $key">selected="selected"</if>>{$value}
															</option>
														</foreach>
													</select>
												</div> 
												<if condition="(($data[$org::$type_d] == 1 && $data[$org::$isReceive_d] == 2)) && ($status != 9) ">
													<a href="{:U('cancelReturnOrder',array($org::$id_d=>$data[$org::$id_d], $org::$type_d => $data[$org::$type_d]))}" >
														<input class="btn btn-primary" type="button"
														value="【退货】款">
													</a>
												</if>
											</td>
										</tr>

										<tr>
											<td>退货描述：</td>
											<td><textarea id="reason" cols="" rows=""
													readonly="readonly" class="area returnGoods"
													>{$data[$org::$explain_d]}</textarea>
											</td>
										</tr>
										<tr>
											<td>用户上传照片：</td>
											<td><a href="{$data[$org::$voucher_d]}" target="_blank"><img
													src="{$data[$org::$voucher_d]}" width="85" height="85" /></a>&nbsp;&nbsp;&nbsp;</td>
										</tr>
										<tr>
											<td>状态：</td>
											<td>
												<div class="form-group  col-xs-3">
													<select class="form-control" name="{$org::$status_d}">
														<foreach name="returnGoods" key='key' item='value'>
															<option value="{$key}"<if condition="$data[$org::$status_d] eq $key">selected="selected"</if>>
																{$value}
															</option>
														</foreach>
													</select>
												</div>
											</td>
										</tr>
									</tbody>
									<tfoot>
										<tr>
											<td><input type="hidden" name="{$org::$id_d}"
												value="{$data[$org::$id_d]}"></td>
											<td class="text-right"><input class="btn btn-primary"
												type="button" onclick="Tool.savePost('return_form', '{:U('editReturnGoods')}')" value="保存"></td>
										</tr>
									</tfoot>
								</table>
							</div>
						</div>
					</form>
					<!--表单数据-->
				</div>
			</div>
		</div>
	</section>
</div>
<script src="__COMMON__/js/jquery-form.js"></script>
<script src="__COMMON__/js/alert.js"></script>
</block>